﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DAICHUL.aspx.cs" Theme="Default" Inherits="Web.Pages.YongShui._14.DAICHULGL.DAICHUL" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>待处理</title>
    <script type="text/javascript" src="../../../JS/jquery.js"></script>
     <style type="text/css">
        .test2 {
           color: red
        }
    </style>
    <script type="text/javascript">

        function LocationTo(url)
        {
            //alert(url);
            
            location = url;

        }

        $(document).ready(function () {
            //setInterval(function () {
            //    $(".test2").fadeOut(2000).fadeIn(2000);
            //}, 4000);
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            来函待处理管理
        </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div style="margin: 10px"><font ><span runat="server" id="dclmsg" style="font-weight: 600; font-size: 26px">您还有待处理事项：</span></font></div>
                <fieldset style="border: 1px solid  cornflowerblue;">
                    <legend><b>条件筛选</b></legend>
                    <dx:ASPxLoadingPanel ID="LoadPanel" Theme="Metropolis" ClientInstanceName="LoadPanel" runat="server" Modal="True" Text="正在查询..."></dx:ASPxLoadingPanel>
                    <table style="width: 100%">
                        <tr>
                            <td align="right" style="width: 10%">审批类型：
                            </td>
                            <td style="width: 100px">
                                <dx:ASPxComboBox ID="DrpLX" Width="100px" OnSelectedIndexChanged="DrpLX_SelectIndexChange" AutoPostBack="true" runat="server" ValueType="System.String">

                                    <ClientSideEvents SelectedIndexChanged="function(s, e) {  
                           
                                                     LoadPanel.Show();  
                                                }" />
                                </dx:ASPxComboBox>
                            </td>
                            <td runat="server" id="TotalTd"></td>

                            <td>
                                <dx:ASPxButton runat="server" ID="btnSX" Text="刷新" UseSubmitBehavior="false" OnClick="btnSX_Click">

                                </dx:ASPxButton>
                            </td>
                        </tr>

                    </table>


                </fieldset>
                <br />
                <div>
                    <dx:ASPxGridView ID="gvDaiChuLi" runat="server" AutoGenerateColumns="False" KeyFieldName="S_YONGHUBH" Width="100%" Theme="Aqua1">

                        <Columns>
                            <dx:GridViewDataTextColumn Caption=" " FieldName="DAYS"  Width="3%" MinWidth="40" HeaderStyle-HorizontalAlign="Center">
                                <DataItemTemplate>
                                    <span  class="test2"><%#Convert.ToInt32(Eval("DAYS"))<=0?"！":"" %></span>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="ROWNUM" Caption="序号" Width="5%" MinWidth="60" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="DAYS" Caption="到期天数" Width="9%" MinWidth="80" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>

                            <dx:GridViewDataTextColumn FieldName="S_LAIHANLXMC" Caption="来函类型" MinWidth="80" Width="10%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="办理状态" FieldName="I_LIUCHENGBH" MinWidth="80" Width="10%" HeaderStyle-HorizontalAlign="Center">
                                <DataItemTemplate>
                                    <%#GetLCBHMC(Convert.ToInt32(Eval("i_liuchengbh"))) %>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>

                            <dx:GridViewDataTextColumn FieldName="S_LAIHANBH" Caption="来函编号" MinWidth="100" Width="13%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_XUKEBH" Caption="许可受理号" MinWidth="110" Width="13%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>


                            <dx:GridViewDataTextColumn FieldName="S_YONGHUBH" Caption="用户号" MinWidth="80" Width="10%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" MinWidth="250" Width="23%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn MinWidth="85" Width="7%" Caption="操作">
                                <DataItemTemplate>

                                    <%--<a href="<%#Eval("S_URL")+"?ID="+Eval("ID") %>">操作</a>--%>
                                    <a href="javascript:LocationTo('<%#Eval("S_URL")+"?ID="+Eval("ID") %>')">操作</a>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <SettingsBehavior AllowSort="true" />
                        <Settings VerticalScrollableHeight="250" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                    </dx:ASPxGridView>

                </div>
                <div>
                    <fieldset style="border: 1px solid  cornflowerblue;">
                        <table style="width: 100%">
                            <tr>
                                <td align="right" style="width: 10%">业务类型：
                                </td>
                                <td style="width: 100px">
                                    <dx:ASPxComboBox ID="cmLaiHanLX2" Width="100px" OnSelectedIndexChanged="cmLaiHanLX2_SelectedIndexChanged" AutoPostBack="true" runat="server" ValueType="System.String">

                                        <ClientSideEvents SelectedIndexChanged="function(s, e) {  
                           
                                                     LoadPanel.Show();  
                                                }" />
                                    </dx:ASPxComboBox>
                                </td>
                                <td runat="server" id="TotalTd2"></td>
                            </tr>

                        </table>


                    </fieldset>
                    <dx:ASPxGridView ID="gvOther" runat="server" AutoGenerateColumns="False" KeyFieldName="S_YONGHUBH" Width="100%" Theme="Aqua1">

                        <Columns>
                            <dx:GridViewDataTextColumn Caption=" " FieldName="DAYS" Width="3%" MinWidth="40" HeaderStyle-HorizontalAlign="Center">
                                <DataItemTemplate>
                                  <%--  <span class="test2"><%#Convert.ToInt32(Eval("DAYS"))<=0?"！":"" %></span>--%>
                                </DataItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="ROWNUM" Caption="序号" Width="5%" MinWidth="60" HeaderStyle-HorizontalAlign="Center">
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="DAYS" Caption="到期天数" Width="9%" MinWidth="80" HeaderStyle-HorizontalAlign="Center" Visible="False">
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>

                            <dx:GridViewDataTextColumn FieldName="S_LAIHANLXMC" Caption="来函类型" MinWidth="80" Width="10%" HeaderStyle-HorizontalAlign="Center">
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="办理状态" FieldName="I_LIUCHENGBH" MinWidth="80" Width="10%" HeaderStyle-HorizontalAlign="Center">
                                <DataItemTemplate>
                                    <%#GetLCBHMC(Convert.ToInt32(Eval("i_liuchengbh"))) %>
                                </DataItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>

                            <dx:GridViewDataTextColumn FieldName="S_LAIHANBH" Caption="来函编号" MinWidth="100" Width="13%" HeaderStyle-HorizontalAlign="Center">
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_XUKEBH" Caption="许可受理号" MinWidth="110" Width="13%" HeaderStyle-HorizontalAlign="Center">
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>


                            <dx:GridViewDataTextColumn FieldName="S_YONGHUBH" Caption="用户号" MinWidth="80" Width="10%" HeaderStyle-HorizontalAlign="Center">
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" MinWidth="250" Width="23%" HeaderStyle-HorizontalAlign="Center">
                                <HeaderStyle HorizontalAlign="Center" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn MinWidth="85" Width="7%" Caption="操作">
                                <DataItemTemplate>

                                    <a href="<%#Eval("S_URL")+"?ID="+Eval("ID") %>">操作</a>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <SettingsBehavior AllowSort="true" />
                        <Settings VerticalScrollableHeight="250" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                    </dx:ASPxGridView>

                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
    <script>
        //gvDaiChuLi_DXHeaderTable
        loadColor();
        //颜色加载
        function loadColor() {
            $("#gvDaiChuLi_DXMainTable").find('tbody').each(function (index, item) {
                $(this).find('tr').each(function () {
                    var tdArr = $(this).children();
                    var days = tdArr.eq(2).text(); //到期天数
                    if (days <= 2 && days >= 0) {
                        $(this).css("color", " 	#FF8C00");
                    }
                    if (days < 0) {
                        $(this).css("color", " 	red");
                    }
                })
            })
        }
        $('#gvDaiChuLi tbody>tr').click(function () {
            var tdArr = $(this).children();
            var days = tdArr.eq(2).text(); //到期天数
            if (days <= 2 && days >= 0) {
                $($(this).children()).css("color", "#FF8C00");
            }
            if (days < 0) {
                $($(this).children()).css("color", "red");
            }
        });
        $('#gvDaiChuLi tbody>tr').click(function () {
           
            setTimeout('loadColor()', 150);

        });
    </script>
</html>
